home *** CD-ROM | disk | FTP | other *** search
- Path: howland.reston.ans.net!psinntp!psinntp!psinntp!psinntp!usenet
- From: grantp@usa.pipeline.com(Pete Grant)
- Newsgroups: comp.lang.c++
- Subject: Re: Input / output files
- Date: 22 Mar 1996 22:53:27 GMT
- Organization: Pipeline USA
- Message-ID: <4ivb17$6h@news1.h1.usa.pipeline.com>
- References: <4iubnc$ct7@wagner.spc.videotron.ca>
- NNTP-Posting-Host: 38.8.60.8
- X-PipeUser: grantp
- X-PipeHub: usa.pipeline.com
- X-PipeGCOS: (Pete Grant)
- X-Newsreader: Pipeline v3.5.0
-
- On Mar 22, 1996 17:00:40 in article <Input / output files>,
- 'alixand@stjeannet.ca (Fignan)' wrote:
-
- Sorry, accidentally hit a key that caused a premature send
- >
- >Hi , I have 2 simple and easy question
- >
- >1- How can we create an output files?
- >
- > 1.1. How can we write in it?
- >
- void writeit ()
- {
- ofstream os("myfile.dat", ios::);
- os << "Now is the time for all good...";
- }
-
- >2. How can we use an existing file?
- >
- Yes.
-
- >3. What is the format os such a file?
- >
- Depends on how it was created & written.
-
- >4. Is it possible to save a class data on such a file?
- >
- Yes, but not in binary mode in most cases.
-
- --
-
- Pete Grant
- Kalevi, Inc.
- Sofware Engineering
-